object fm_OrdemServico: Tfm_OrdemServico
  Left = 0
  Top = 0
  Caption = 'Cadastro de Ordem de Servi'#231'o'
  ClientHeight = 569
  ClientWidth = 1114
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  KeyPreview = True
  OldCreateOrder = False
  OnClose = FormClose
  OnCreate = FormCreate
  PixelsPerInch = 96
  TextHeight = 13
  object pn_Filtros: TPanel
    Left = 0
    Top = 0
    Width = 1114
    Height = 72
    Align = alTop
    TabOrder = 0
    object rg_Filtros: TGroupBox
      Left = 1
      Top = 1
      Width = 1112
      Height = 70
      Align = alClient
      Caption = 'Filtros'
      TabOrder = 0
      object gb_DataOrdem: TGroupBox
        AlignWithMargins = True
        Left = 5
        Top = 18
        Width = 258
        Height = 47
        Align = alLeft
        Caption = 'Dt. Ordem'
        TabOrder = 0
        object Label1: TLabel
          AlignWithMargins = True
          Left = 5
          Top = 18
          Width = 12
          Height = 24
          Align = alLeft
          Caption = 'de'
          ExplicitHeight = 13
        end
        object Label2: TLabel
          AlignWithMargins = True
          Left = 128
          Top = 18
          Width = 16
          Height = 24
          Align = alLeft
          Caption = 'at'#233
          ExplicitHeight = 13
        end
        object dt_Ordem_de: TDateTimePicker
          AlignWithMargins = True
          Left = 23
          Top = 18
          Width = 99
          Height = 24
          Align = alLeft
          Date = 41194.644662708340000000
          Time = 41194.644662708340000000
          ShowCheckbox = True
          TabOrder = 0
        end
        object dt_Ordem_ate: TDateTimePicker
          AlignWithMargins = True
          Left = 150
          Top = 18
          Width = 99
          Height = 24
          Align = alLeft
          Date = 41194.644662708340000000
          Time = 41194.644662708340000000
          ShowCheckbox = True
          TabOrder = 1
        end
      end
      object GroupBox1: TGroupBox
        AlignWithMargins = True
        Left = 269
        Top = 18
        Width = 212
        Height = 47
        Align = alLeft
        Caption = 'Status'
        TabOrder = 1
        object dblk_Status: TDBLookupComboBox
          AlignWithMargins = True
          Left = 5
          Top = 18
          Width = 145
          Height = 21
          Align = alLeft
          KeyField = 'nr_sequencia'
          ListField = 'ds_status_os'
          ListSource = ds_Status
          TabOrder = 0
        end
      end
    end
  end
  object pn_alClient_Geral: TPanel
    Left = 0
    Top = 72
    Width = 1114
    Height = 497
    Align = alClient
    TabOrder = 1
    object Splitter1: TSplitter
      Left = 353
      Top = 1
      Width = 8
      Height = 495
      Beveled = True
      ExplicitLeft = 513
      ExplicitTop = 0
    end
    object Splitter2: TSplitter
      Left = 400
      Top = 1
      Width = 8
      Height = 495
      Align = alRight
      Beveled = True
      ExplicitLeft = 513
      ExplicitTop = 0
    end
    object pn_alClient_Produto: TPanel
      Left = 408
      Top = 1
      Width = 705
      Height = 495
      Align = alRight
      TabOrder = 2
      object gb_Produto: TGroupBox
        Left = 1
        Top = 1
        Width = 703
        Height = 493
        Align = alClient
        Caption = 'Lista de produtos '
        TabOrder = 0
        object dbGrid_Cadastro_Interno: TFocusDbGrid
          Left = 2
          Top = 15
          Width = 699
          Height = 476
          Align = alClient
          Color = clWindow
          Columns = <
            item
              Expanded = False
              FieldName = 'cd_Grupo'
              Title.Caption = 'C'#243'd. Grupo'
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'prC'#243'digoProduto'
              Title.Caption = 'C'#243'd.'
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'prProduto'
              Title.Caption = 'Produto'
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'prcodigocr'
              Title.Caption = 'C'#243'd. reduzido'
              Width = 91
              Visible = True
            end>
          DrawingStyle = gdsGradient
          Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgCancelOnExit, dgTitleClick, dgTitleHotTrack]
          PopupMenu = pm_Principal
          ReadOnly = True
          TabOrder = 0
          TitleFont.Charset = DEFAULT_CHARSET
          TitleFont.Color = clWindowText
          TitleFont.Height = -11
          TitleFont.Name = 'Tahoma'
          TitleFont.Style = []
          ColorParStart = 14806271
          ColorParEnd = 12703487
          ColorImparStart = clWhite
          ColorImparEnd = 14803425
          SQL.Strings = (
            'select *'
            
              'from (select *, Left(PRC'#211'DIGOPRODUTO,4) as cd_grupo from produto' +
              ')'
            'where 1=1')
          Params = <>
          TipoClasseBase = TProdutoInterno
          TipoClasseDestino = Null
          AllowAppend = False
          FilterOFFOnColSearch = False
          Columns = <
            item
              Expanded = False
              FieldName = 'cd_Grupo'
              Title.Caption = 'C'#243'd. Grupo'
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'prC'#243'digoProduto'
              Title.Caption = 'C'#243'd.'
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'prProduto'
              Title.Caption = 'Produto'
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'prcodigocr'
              Title.Caption = 'C'#243'd. reduzido'
              Width = 91
              Visible = True
            end>
        end
      end
    end
    object pn_Top: TPanel
      Left = 1
      Top = 1
      Width = 352
      Height = 495
      Align = alLeft
      TabOrder = 0
      object gb_OrdemServico: TGroupBox
        Left = 1
        Top = 1
        Width = 350
        Height = 493
        Align = alClient
        Caption = 'Ordem de servi'#231'o'
        TabOrder = 0
        object dbg_Ordem_Servico: TFocusDbGrid
          Left = 2
          Top = 15
          Width = 346
          Height = 476
          Align = alClient
          Color = clWhite
          Columns = <
            item
              Expanded = False
              FieldName = 'nr_sequencia'
              Title.Caption = 'C'#243'd.Seq.'
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'dt_ordem'
              Title.Caption = 'Data'
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'ds_status_os'
              Title.Caption = 'Status'
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'nr_seq_status_os'
              Visible = False
            end>
          DrawingStyle = gdsGradient
          Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgCancelOnExit, dgMultiSelect, dgTitleClick, dgTitleHotTrack]
          PopupMenu = pm_Principal
          TabOrder = 0
          TitleFont.Charset = DEFAULT_CHARSET
          TitleFont.Color = clWindowText
          TitleFont.Height = -11
          TitleFont.Name = 'Tahoma'
          TitleFont.Style = []
          ColorParStart = 16773874
          ColorParEnd = 16768991
          ColorImparStart = clWhite
          ColorImparEnd = 14803425
          SQL.Strings = (
            'select '#9'*'
            'from'#9'('
            #9'SELECT '#9'a.nr_sequencia,'
            #9#9'a.nr_seq_status_os,'
            #9#9'a.dt_ordem,'
            #9#9'b.ds_status_os'
            #9'FROM'#9'ordem_servico a  '
            
              #9'LEFT JOIN status_ordem_servico b On (b.nr_sequencia = a.nr_seq_' +
              'status_os)'
            ')'
            'where 1=1')
          SubDetail = dbg_Ordem_Servico_Item
          Params = <>
          TipoClasseBase = TOrdemServico
          TipoClasseDestino = Null
          AllowAppend = True
          FilterOFFOnColSearch = False
          Columns = <
            item
              Expanded = False
              FieldName = 'nr_sequencia'
              Title.Caption = 'C'#243'd.Seq.'
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'dt_ordem'
              Title.Caption = 'Data'
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'ds_status_os'
              Title.Caption = 'Status'
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'nr_seq_status_os'
              Visible = False
            end>
        end
      end
    end
    object pn_alClient: TPanel
      Left = 361
      Top = 1
      Width = 39
      Height = 495
      Align = alClient
      TabOrder = 1
      object gb_OrdemServicoItem: TGroupBox
        Left = 1
        Top = 1
        Width = 37
        Height = 493
        Align = alClient
        Caption = #205'tens da ordem de servi'#231'o'
        TabOrder = 0
        object dbg_Ordem_Servico_Item: TFocusDbGrid
          Left = 2
          Top = 15
          Width = 33
          Height = 476
          Align = alClient
          Color = clWindow
          Columns = <
            item
              Expanded = False
              FieldName = 'nr_sequencia'
              ReadOnly = True
              Title.Caption = 'C'#243'd.Seq.'
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'nr_seq_ordem_servico'
              ReadOnly = True
              Title.Caption = 'Or.Serv.'
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'nr_seq_produto'
              ReadOnly = True
              Title.Caption = 'C'#243'd.Produto'
              Width = 99
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'prproduto'
              ReadOnly = True
              Title.Caption = 'Descri'#231#227'o'
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'qt_produto'
              Title.Caption = 'Qtd.'
              Visible = True
            end>
          DrawingStyle = gdsGradient
          TabOrder = 0
          TitleFont.Charset = DEFAULT_CHARSET
          TitleFont.Color = clWindowText
          TitleFont.Height = -11
          TitleFont.Name = 'Tahoma'
          TitleFont.Style = []
          ColorParStart = clCream
          ColorParEnd = 16760799
          ColorImparStart = clWhite
          ColorImparEnd = 14803425
          SQL.Strings = (
            'SELECT '#9'a.nr_sequencia,'
            #9'a.nr_seq_ordem_servico,'
            #9'a.nr_seq_produto,'
            #9'a.qt_produto,'
            #9'b.prproduto '
            'FROM '#9'ordem_servico_item a      '
            'INNER JOIN produto b On (b.prc'#243'digoproduto = a.nr_seq_produto)'
            'WHERE '#9'1=1'
            'And '#9'nr_seq_ordem_servico = :nr_sequencia')
          Params = <
            item
              DataType = ftInteger
              Name = 'nr_sequencia'
              ParamType = ptUnknown
            end>
          TipoClasseBase = TOrdemServicoItem
          TipoClasseDestino = Null
          AllowAppend = False
          FilterOFFOnColSearch = False
          Columns = <
            item
              Expanded = False
              FieldName = 'nr_sequencia'
              ReadOnly = True
              Title.Caption = 'C'#243'd.Seq.'
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'nr_seq_ordem_servico'
              ReadOnly = True
              Title.Caption = 'Or.Serv.'
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'nr_seq_produto'
              ReadOnly = True
              Title.Caption = 'C'#243'd.Produto'
              Width = 99
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'prproduto'
              ReadOnly = True
              Title.Caption = 'Descri'#231#227'o'
              Visible = True
            end
            item
              Expanded = False
              FieldName = 'qt_produto'
              Title.Caption = 'Qtd.'
              Visible = True
            end>
        end
      end
    end
  end
  object qy_Status: TADOQuery
    Parameters = <>
    SQL.Strings = (
      'select * from status_ordem_servico')
    Left = 552
    Top = 16
  end
  object ds_Status: TDataSource
    DataSet = qy_Status
    Left = 632
    Top = 16
  end
  object pm_Principal: TPopupMenu
    OnPopup = pm_PrincipalPopup
    Left = 712
    Top = 16
    object mi_AddProduto: TMenuItem
      Caption = 'Adicionar produto'
      OnClick = mi_AddProdutoClick
    end
    object mi_definirstatus: TMenuItem
      Caption = 'Definir status...'
    end
  end
end
